package admin;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ComputingDays {
	public static long computingdays(String initialTime) throws ParseException{
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		Date initialDate = simpleDateFormat.parse(initialTime);
		long initialDates=initialDate.getTime();
		
		Date date=new Date();
		long nowDates=date.getTime();
		long days=(nowDates-initialDates)/(1000*60*60*24);
		return days;
	}

}
